﻿// Decompiled with JetBrains decompiler
// Type: MCM.LightInject.ContainerOptions
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using System;
using System.Diagnostics.CodeAnalysis;

#nullable disable
namespace MCM.LightInject
{
  [ExcludeFromCodeCoverage]
  internal class ContainerOptions
  {
    private static readonly Lazy<ContainerOptions> DefaultOptions = new Lazy<ContainerOptions>(new Func<ContainerOptions>(ContainerOptions.CreateDefaultContainerOptions));

    public ContainerOptions()
    {
      this.EnableVariance = true;
      this.EnablePropertyInjection = true;
      this.LogFactory = (Func<Type, Action<LogEntry>>) (t => (Action<LogEntry>) (message => { }));
      this.EnableCurrentScope = true;
      this.EnableOptionalArguments = false;
      this.OptimizeForLargeObjectGraphs = false;
    }

    public static ContainerOptions Default => ContainerOptions.DefaultOptions.Value;

    public bool EnableVariance { get; set; }

    public Func<Type, bool> VarianceFilter { get; set; } = (Func<Type, bool>) (_ => true);

    public Func<Type, Action<LogEntry>> LogFactory { get; set; }

    public Func<string[], string> DefaultServiceSelector { get; set; } = (Func<string[], string>) (services => string.Empty);

    public bool EnablePropertyInjection { get; set; }

    public bool EnableCurrentScope { get; set; }

    public bool EnableOptionalArguments { get; set; }

    public bool OptimizeForLargeObjectGraphs { get; set; }

    private static ContainerOptions CreateDefaultContainerOptions() => new ContainerOptions();
  }
}
